package com.wgchao.authmanager.infrastructure.jpa.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.util.Date;

/**
 * @ClassName: UserInfo
 * @author: wgchao
 * @createTime: 2020/4/29 2:14 PM
 * @Description: 账户信息表
 */
@Entity
@Table(name = "am_user_info", uniqueConstraints =
        {@UniqueConstraint(name = "userIdentity", columnNames = {"uname"})})
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserInfo {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(length = 20)
    private String uname;

    @Column(length = 50)
    private String name;

    @Column(length = 150)
    private String password;

    @Column(length = 100)
    private String agencyCode;

    @Column(length = 20)
    private String tel;

    @Column(length = 50)
    private String email;

    private boolean disabled;

    @Column(length = 20)
    private String createUser;

    private Date createTime;

    @Column(length = 20)
    private String lastUpdateUser;

    private Date lastUpdateTime;

    private boolean del;

    @Version
    private Long version;
}
